package testing;


import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

import seperator.NounSeperator;
import words.Noun;

public class SeperatorTest {
	private NounSeperator noun;
	@Before
	public void setUp() throws Exception {
		this.noun = new NounSeperator();
	}
	@Test
	public void test1()
	{
		String[] aa = {"Tom","Cruise","is","a","man"};
		noun.setdata(aa);
		noun.seperate();
		Noun n = noun.getResult();
		int result = n.getArrayList().size();
		assertEquals(result,1);
	}
	@Test
	public void test2()
	{
		String [] aa = {"He","is","a","boy"};
		noun.setdata(aa);
		noun.seperate();
		Noun n = noun.getResult();
		int result = n.getArrayList().size();
		assertEquals(result,0);
	
	}
	@Test
	public void test3()
	{
		String [] aa = {"Tom","Cruise","likes","Tom","Crueise","."};
		noun.setdata(aa);
		noun.seperate();
		Noun n = noun.getResult();
		int result = n.getArrayList().size();
		assertEquals(result,2);
	}

}
